import dayjs from 'dayjs'
import { formatMoney } from '@/utils/util'
import('dayjs/locale/zh-cn')
export default function(Vue) {
  Vue.filter('dateformat', function(dataStr, pattern = 'YYYY-MM-DD HH:mm:ss') {
    return dayjs(dataStr).format(pattern)
  })
  Vue.filter('formatDecimals', function(val,decimals = 2) {
    return formatMoney(val,decimals,'.','')
  })
}
